package com.lxy.sentinel.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Service;

/**
 * @author lixinyang
 * @className: TestSentinelService
 * @description: TODO
 * @date 2022/04/28日  13:07
 */

@Service
public class TestSentinelService {

    @SentinelResource(value = "sayHello") //@SentinelResource用来标识资源是否被限流、降级；一般推荐将 @SentinelResource 注解加到服务实现上
    public String sayHello(String name) {
        return "Hello, " + name;
    }
}
